import request from '@/utils/request'

// 查询客诉工单列表
export function listKsOrder(query) {
  return request({
    url: '/hmk/ksOrder/list',
    method: 'get',
    params: query
  })
}


export function listKsOrderReplyLog(query) {
  return request({
    url: '/hmk/ksReplylog/list',
    method: 'get',
    params: query
  })
}


export function addKsOrderReplyLog(data) {
  return request({
    url: '/hmk/ksReplylog/add',
    method: 'post',
    data: data
  })
}

// 查询客诉工单详细
export function getKsOrder(id) {
  return request({
    url: '/hmk/ksOrder/' + id,
    method: 'get'
  })
}

export function selectUsersByIds() {
  return request({
    url: '/hmk/ksOrder/selectUsersByIds',
    method: 'get'
  })
}


export function selectRxOrderBySerial(serial) {
  return request({
    url: '/hmk/ksOrder/selectRxOrderBySerial/' + serial,
    method: 'get'
  })
}

// 新增客诉工单
export function addKsOrder(data) {
  return request({
    url: '/hmk/ksOrder',
    method: 'post',
    data: data
  })
}

// 修改客诉工单
export function updateKsOrder(data) {
  return request({
    url: '/hmk/ksOrder',
    method: 'put',
    data: data
  })
}

// 删除客诉工单
export function delKsOrder(id) {
  return request({
    url: '/hmk/ksOrder/' + id,
    method: 'delete'
  })
}


